package com.platform.sys.modular.syncdata.enums;

import com.platform.sys.modular.syncdata.executor.abs.SyncDataStrategy;
import com.platform.sys.modular.syncdata.executor.IncreaseStrategyExecutor;
import com.platform.sys.modular.syncdata.executor.ReduceStrategyExecutor;
import com.platform.sys.modular.syncdata.executor.UpdateStrategyExecutor;

/**
 * 同步目标策略
 *
 * @author gyp
 * @date 2022-12-05 11:00:08
 */
public enum TargetStrategyEnum {

    /**
     * 1、更新；2、递增；3、递减
     */
    UPDATE(1, new UpdateStrategyExecutor()),
    INCREASE(2, new IncreaseStrategyExecutor()),
    REDUCE(3, new ReduceStrategyExecutor());

    private final Integer strategyCode;

    private final SyncDataStrategy syncDataStrategy;

    TargetStrategyEnum(Integer strategyCode, SyncDataStrategy syncDataStrategy) {
        this.strategyCode = strategyCode;
        this.syncDataStrategy = syncDataStrategy;
    }

    public Integer getStrategyCode() {
        return strategyCode;
    }

    public SyncDataStrategy getPaymentStrategy() {
        return syncDataStrategy;
    }


}
